package com.ctrip.ec.api.mobile.service.job;

import com.ctrip.ec.biz.dao.cart.CartDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by jiangzy on 2018/11/12.
 */
@Service
public class CartJob implements Runnable {

    private static final Logger logger = LoggerFactory.getLogger(CartJob.class);

    @Autowired
    private CartDao cart;

    @Override
    public void run() {
        try {
            cart.expire();
        } catch (Exception ex) {
            logger.error(ex.getMessage(), ex);
        }
    }
}
